package com.myblog.util;

import com.myblog.shiro.AccountProfile;
import org.apache.shiro.SecurityUtils;

public class ShiroUtil {
    public static AccountProfile getProfile() {
        // 在登录成功后，取出当前登录的用户
        return (AccountProfile) SecurityUtils.getSubject().getPrincipal();
    }
}
